{
unsigned long sectors, sector_size;
unsigned int binfo;
+ int err;
if (info->connected == BLKIF_STATE_CONNECTED)
return;
DPRINTK("blkfront.c:connect:%s.\n", info->xbdev->otherend);
- int err = xenbus_gather(NULL, info->xbdev->otherend,
- "sectors", "%lu", §ors,
- "info", "%u", &binfo,
- "sector-size", "%lu", §or_size,
- NULL);
+ err = xenbus_gather(NULL, info->xbdev->otherend,
+ "sectors", "%lu", §ors,
+ "info", "%u", &binfo,
+ "sector-size", "%lu", §or_size,
+ NULL);
if (err) {
xenbus_dev_fatal(info->xbdev, err,
"reading backend fields at %s",
static int blkfront_remove(struct xenbus_device *dev)
{
- DPRINTK("blkfront_remove: %s removed\n", dev->nodename);
-
struct blkfront_info *info = dev->data;
+ DPRINTK("blkfront_remove: %s removed\n", dev->nodename);
+
blkif_free(info);
kfree(info);
struct backend_info *be = xdev->data;
netif_t *netif = be->netif;
int i = 0, length = 0;
+ char *val;
DPRINTK("netback_hotplug");
- char *val = xenbus_read(NULL, xdev->nodename, "script", NULL);
+ val = xenbus_read(NULL, xdev->nodename, "script", NULL);
if (IS_ERR(val)) {
int err = PTR_ERR(val);
xenbus_dev_fatal(xdev, err, "reading script");
struct xenbus_device *dev =
container_of(watch, struct xenbus_device, otherend_watch);
struct xenbus_driver *drv = to_xenbus_driver(dev->dev.driver);
+ XenbusState state;
/* Protect us against watches firing on old details when the otherend
details change, say immediately after a resume. */
return;
}
- XenbusState state = xenbus_read_driver_state(dev->otherend);
+ state = xenbus_read_driver_state(dev->otherend);
- DPRINTK("state is %d, %s, %s", state, dev->otherend_watch.node, vec[XS_WATCH_PATH]);
+ DPRINTK("state is %d, %s, %s",
+ state, dev->otherend_watch.node, vec[XS_WATCH_PATH]);
drv->otherend_changed(dev, state);
}